#!/bin/bash

NCL_SCRIPT_PATH="$HOME/Codes/WRF_scripts/WRF_Post/"
wrfpost_dir="$HOME/wrfpost"
domain="d01"
d02_list=`find ~/wrfout/*/ -name "*wrfout_d01*"`
cd $NCL_SCRIPT_PATH
for ifile in $d02_list
do
    echo $ifile
    start_date=${ifile:25:10}
    gn_wind_dir="$wrfpost_dir/test/selectgrid_wind/"
    echo $start_date
    mkdir -p $gn_wind_dir
    ncl input_file='"'$ifile'"' output_prefix='"'$gn_wind_dir'"' wrfout_to_selectgrid_wind.ncl
done
